package com.imooc.o2o.entity;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

@Data
@Entity
@Table(name = "tb_product")
public class Product implements Serializable {

	@Column(name = "product_id")
	private Integer productId;

	@Column(name = "product_name")
	private String productName;

	@Column(name = "product_desc")
	private String productDesc;

	//简略图
	@Column(name = "img_addr")
	private String imgAddr;

	@Column(name = "normal_price")
	private String normalPrice;

	@Column(name = "promotion_price")
	private String promotionPrice;

	private Integer priority;

	@Column(name = "create_time")
	private java.util.Date createTime;

	@Column(name = "last_edit_time")
	private java.util.Date lastEditTime;

	// -1 不可用 0 下架 1 在前端展示系统展示
	@Column(name = "enable_status")
	private Integer enableStatus;

//	@Column(name = "product_category_id")
//	private Integer productCategoryId;
//
//	@Column(name = "shop_id")
//	private Integer shopId;
	//下面这个是新增加的 视频里的
	//商品详情列表
	private List<ProductImg> productImgList;
	private ProductCategory productCategory;
	//商品由哪个店铺发布的
	private Shop shop;

}
